package com.tajiang.business.common.http;

import android.app.Dialog;

import com.tajiang.business.common.utils.LogUtils;

import okhttp3.RequestBody;

/**
 * Created by Administrator on 2016/6/20.
 */
public class HttpHandler implements HttpLoad {

    private HttpLoad httpLoad;

    public HttpHandler(HttpResponseListener listener, Dialog mProgressDialog) {
        httpLoad = new HttpForRetrofit(listener, mProgressDialog);
    }

    public HttpHandler(HttpResponseListener listener) {
        this(listener, null);
        httpLoad = new HttpForRetrofit(listener);
    }

    @Override
    public void signinCheck(String userName, String passWord) {
        httpLoad.signinCheck(userName, passWord);
    }

    @Override
    public void getAmountRecord(int page, int pagesize) {
        httpLoad.getAmountRecord(page, pagesize);
    }

    @Override
    public void getStoreOrder(String apartmentId, String condition, Integer page, Integer pagesize, Integer menu) {
        LogUtils.e("【518】-->getStoreOrder(" + apartmentId + "," + condition + ")");
        httpLoad.getStoreOrder(apartmentId, condition, page, pagesize, menu);
    }


    @Override
    public void refund(String orderGoodsId) {

    }

    @Override
    public void singleRecord(String storeId, String schoolId, Integer page, Integer pagesize, String buyerPhone, String orderSn) {

    }

    @Override
    public void updateApartment(String id, String name, String zonesId) {

    }

    @Override
    public void getApartment(String schoolId) {
        httpLoad.getApartment(schoolId);
    }

    @Override
    public void getZones(String schoolId) {

    }

    @Override
    public void getRegCode(String mobilePhone) {
        httpLoad.getRegCode(mobilePhone);
    }

    public void orderToday() {
        httpLoad.orderToday();
    }

    public void accountInformation() {
        httpLoad.accountInformation();
    }

    public void addBank(String cardNo, String userName, String openBank, String prov, String city) {
        httpLoad.addBank(cardNo, userName, openBank, prov, city);
    }

    @Override
    public void updatePassword(String id, String password, String oldPassword) {
        httpLoad.updatePassword(id, password, oldPassword);
    }

    @Override
    public void verifyRegCode(String mobilePhone, String regcode) {
        httpLoad.verifyRegCode(mobilePhone, regcode);
    }

    @Override
    public void modifyPayPwd(String oldpassword, String password) {
        httpLoad.modifyPayPwd(oldpassword, password);
    }

    @Override
    public void updatePaymentPsd(String password) {
        httpLoad.updatePaymentPsd(password);
    }

    @Override
    public void selctpsd(String schoolUserId) {
        httpLoad.selctpsd(schoolUserId);
    }

    @Override
    public void canteenMnagement(String schoolId) {
        httpLoad.canteenMnagement(schoolId);
    }

    @Override
    public void judgePwd(String oldpassword) {
        httpLoad.judgePwd(oldpassword);
    }

    @Override
    public void getStores(String schooldId) {
        httpLoad.getStores(schooldId);
    }

    @Override
    public void setPasswordBank(String password, String schoolUserId) {
        httpLoad.setPasswordBank(password, schoolUserId);
    }

    @Override
    public void updateStoreName(String storeId, String name) {
        httpLoad.updateStoreName(storeId, name);
    }

    @Override
    public void updateStoreNotice(String storeId, String notice) {
        httpLoad.updateStoreNotice(storeId, notice);
    }

    @Override
    public void updateStoreState(String storeId, int state) {
        httpLoad.updateStoreState(storeId, state);
    }

    @Override
    public void getStoreTime(String storeId) {
        httpLoad.getStoreTime(storeId);
    }

    @Override
    public void updateStoreSuchedule(String time, String storeId) {
        httpLoad.updateStoreSuchedule(time, storeId);
    }

    @Override
    public void getBalance() {
        httpLoad.getBalance();
    }

    @Override
    public void getSchoolZonesAparment() {
        httpLoad.getSchoolZonesAparment();
    }

    @Override
    public void addApartmentZones(String apartment) {
        httpLoad.addApartmentZones(apartment);
    }

    @Override
    public void updateApartmentZones(String apartment) {
        httpLoad.updateApartmentZones(apartment);
    }

    @Override
    public void getMoneyRecord(String amountRecordId) {
        httpLoad.getMoneyRecord(amountRecordId);
    }

    @Override
    public void getSchoolZones() {
        httpLoad.getSchoolZones();
    }

    @Override
    public void getCeoUserIdBank() {
        httpLoad.getCeoUserIdBank();
    }

    @Override
    public void updateBank(String id, String cardNo, String openBank, String userName, String prov, String city) {
        httpLoad.updateBank(id, cardNo, openBank, userName, prov, city);
    }

    @Override
    public void addApply(float money, String password) {
        httpLoad.addApply(money, password);
    }

    @Override
    public void updateOrderPrint(String orderGoodsIds) {
        httpLoad.updateOrderPrint(orderGoodsIds);
    }

    @Override
    public void collectClientMsg(String userId, String clientId, int os, String osVersion, String deviceModel, String appVersion) {
        httpLoad.collectClientMsg(userId, clientId, os, osVersion, deviceModel, appVersion);
    }

    @Override
    public void bankUtil(String bankNo) {
        httpLoad.bankUtil(bankNo);
    }

    @Override
    public void getOrderGoodsId(String orderId, String stallsId) {
        httpLoad.getOrderGoodsId(orderId, stallsId);
    }

    @Override
    public void updatStallsState(int state) {
        httpLoad.updatStallsState(state);
    }

    @Override
    public void getAppInfo() {
        httpLoad.getAppInfo();
    }

    @Override
    public void presentInformation() {
        httpLoad.presentInformation();
    }

    @Override
    public void getBusinessHistoricalOrder(String apartmentId, String condition, Integer page, Integer pagesize) {
        httpLoad.getBusinessHistoricalOrder(apartmentId, condition, page, pagesize);
    }

    @Override
    public void getBusinessGoods(int page, int pagesize) {
        httpLoad.getBusinessGoods(page, pagesize);
    }

    @Override
    public void updateGoodsState(String goodsId, int state) {
        httpLoad.updateGoodsState(goodsId, state);
    }

    @Override
    public void getStallsNotice(String stallsId) {
        httpLoad.getStallsNotice(stallsId);
    }

    @Override
    public void saveOrUpdateStallsNotice(String stallsId, String notice) {
        httpLoad.saveOrUpdateStallsNotice(stallsId, notice);
    }

    @Override
    public void getQiNiuTokenRequest(String bucketName) {
        httpLoad.getQiNiuTokenRequest(bucketName);
    }

    @Override
    public void userModifyAvatarReq(String avatarNewKey) {
        httpLoad.userModifyAvatarReq(avatarNewKey);
    }

    @Override
    public void upLoadUserIcon(RequestBody Body, int tag) {
        httpLoad.upLoadUserIcon(Body, tag);
    }
}
